FROM 130132914922.dkr.ecr.us-east-1.amazonaws.com/app-base/node:20-v20.11.1 AS installer
ARG build_env
WORKDIR /app
COPY . .
RUN yarn && yarn build:${build_env} .
ENV NODE_ENV production
RUN npx next telemetry disable
ENV build_env $build_env
CMD yarn start:${build_env}

EXPOSE 8080
